﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace CJJCH.Web.Manage
{
    public partial class StandardsDetails : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
           if(!IsPostBack)
           {
               InitRequest();
               InitDataBind();
           }
        }
        private void InitRequest()
        {
            if (Request.QueryString["ID"] != null && LTP.Common.CheckInput.CheckGUID(Request.QueryString["ID"].ToString()))
            {
                lblID.Text = Request.QueryString["ID"].ToString();
            }
        }
        private void InitDataBind()
        {
            if (lblID.Text != "" && LTP.Common.CheckInput.CheckGUID(lblID.Text))
            {
                CJJCH.Model.T_NET_Standards model = new Model.T_NET_Standards();
                model = new BLL.T_NET_Standards().StandardsModel(new Guid(lblID.Text));
                if (model != null)
                {
                    lblDataTitle.Text = model.DataTitle;
                    lblDataServiceID.Text = model.DataServiceID;
                    lblDataName.Text = model.DataName;
                    lblType.Text = model.Third.MenuName;
                    lblDataAithot.Text = model.DataAuthor;
                    lblDataSource.Text = model.DataSource;
                    lblPlusDate.Text = DateTime.Parse(model.PlusDate.ToString()).ToString("yyyy/MM/dd");
                    lblDataAbout.Text = model.DataAbout;
                    lblDataNote.Text = model.DataNote;

                }
                else 
                {
                    LTP.Common.WindowClass.WindowBack("操作错误！");
                }
            }
        }
    }
}